-- GENERATED SPELL FOR [Fiendish Hound] --


function spell0_17540(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(35748,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_17540', 5000, 1)
end

function spell1_17540(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(15785,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17540', 2000, 1)
end

function Sorts_17540(pUnit, Event)
local choix_sorts_17540 = math.random(0, 1)
if choix_sorts_17540 == 0 then
pUnit:RegisterEvent('spell0_17540', 1, 1)
end
if choix_sorts_17540 == 1 then
pUnit:RegisterEvent('spell1_17540', 1, 1)
end
end

function mob17540_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17540', math.random(1500, 3000), 1)
end

function mob17540_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17540_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17540_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17540, 1, 'mob17540_Action')
RegisterUnitEvent(17540, 2, 'mob17540_Leave')
RegisterUnitEvent(17540, 3, 'mob17540_Kill')
RegisterUnitEvent(17540, 4, 'mob17540_Die')
